<?php include view('header');?>

<script src="./js/project_type.js" type="text/javascript"></script>

<h1>系统配置 - 项目类型</h1>

<div class="list">
	<form action="system.php?action=type" method="post">
	<table>
		<thead>
			<tr><td>类型代号</td><td>类型名称</td><td>操作</td></tr>
		</thead>
		<tbody>
		<?php foreach($types as $t){?>
			<tr>
				<td><?php echo $t['id'];?></td>
				<td><?php echo $t['name'];?></td>
				<td>
					<a href="#" onclick="editProjectType($(this))">[修改]</a>
					<a href="#" onclick="deleteProjectType($(this))">[删除]</a>
				</td>
			</tr>
		<?php }?>
			<tr><td></td><td><input type="text" id="name[]" name="name[]" /></td></tr>
		</tbody>
	</table>
	<button type="button" onclick="addNewNode($('tbody tr:last'));">再加一条</button>
	<button type="submit">确认添加全部</button>
	</form>
</div>

<?php include view('footer');?>